package com.moyu.auth.client;

import com.moyu.auth.dto.User;
import com.moyu.auth.dto.UserRegDTO;
import com.moyu.common.core.domain.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 用户服务Feign
 *
 * @Author 赵彦博
 * @Date 2024/12/30 16:54
 */
@FeignClient(name = "forum-user", url = "http://localhost:19090/user/")
public interface UserClient {

    @GetMapping("/queryUserByAccount/{account}")
    R<User> query(@PathVariable("account") String account);

    @PostMapping("/reg")
    int reg(@RequestBody UserRegDTO userRegDTO);
}
